package spring.ioc;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class ServiceB {

    @Bean
    public ServiceA serviceA() {
        
        return new ServiceA() {
            @Override
            public void sayA() {
                System.out.println("aaa");
            }
        };

    }

}
